<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'article-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'tid'); ?>
		<?php echo $form->dropDownList($model,'tid', DefineBox::$pageTypeArray); ?>
		<?php echo $form->error($model,'tid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'subject'); ?>
		<?php echo $form->textField($model,'subject',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'subject'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php echo $form->textArea($model,'content',array('rows'=>15, 'cols'=>74)); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>
	<p>您当前输入了<span class="word_count">0</span>个文字。</p>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->dropDownList($model,'status', array('0'=>'不允许评论', 1=>'允许评论')); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'star'); ?>
		<?php echo $form->dropDownList($model,'star', DefineBox::$starArray); ?>
		<?php echo $form->error($model,'star'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '创建' : '保存'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<script>
	KindEditor.ready(function(K) {
		K.create('#Page_content', {
			allowFileManager : true
		});
	});
</script>